package com.CountDownTatch;

import java.util.concurrent.CountDownLatch;

/**
 * Created by apple on 17/9/29.
 */
public class DataBaseHealth extends BaseHealth {
    public DataBaseHealth(CountDownLatch cdl) {
        super(cdl, "database");
    }

    @Override
    public void service() {
        System.out.println("checking " + this.getServerName());

        try{
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(this.getServerName() + "is up");
    }
}
